<?php

require_once(sfConfig::get('sf_lib_dir').'/filter/base/BaseFormFilterPropel.class.php');

/**
 * empleados filter form base class.
 *
 * @package    gescell
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormFilterGeneratedTemplate.php 16976 2009-04-04 12:47:44Z fabien $
 */
class BaseempleadosFormFilter extends BaseFormFilterPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'sf_guard_user'        => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => true)),
      'nombre'               => new sfWidgetFormFilterInput(),
      'apellido'             => new sfWidgetFormFilterInput(),
      'documento'            => new sfWidgetFormFilterInput(),
      'direccion'            => new sfWidgetFormFilterInput(),
      'ciudad'               => new sfWidgetFormFilterInput(),
      'telefonoparticular'   => new sfWidgetFormFilterInput(),
      'telefonocasa'         => new sfWidgetFormFilterInput(),
      'correo1'              => new sfWidgetFormFilterInput(),
      'correo2'              => new sfWidgetFormFilterInput(),
      'informacionadicional' => new sfWidgetFormFilterInput(),
      'created_at'           => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => true)),
      'updated_at'           => new sfWidgetFormFilterDate(array('from_date' => new sfWidgetFormDate(), 'to_date' => new sfWidgetFormDate(), 'with_empty' => true)),
    ));

    $this->setValidators(array(
      'sf_guard_user'        => new sfValidatorPropelChoice(array('required' => false, 'model' => 'sfGuardUser', 'column' => 'id')),
      'nombre'               => new sfValidatorPass(array('required' => false)),
      'apellido'             => new sfValidatorPass(array('required' => false)),
      'documento'            => new sfValidatorPass(array('required' => false)),
      'direccion'            => new sfValidatorPass(array('required' => false)),
      'ciudad'               => new sfValidatorPass(array('required' => false)),
      'telefonoparticular'   => new sfValidatorPass(array('required' => false)),
      'telefonocasa'         => new sfValidatorPass(array('required' => false)),
      'correo1'              => new sfValidatorPass(array('required' => false)),
      'correo2'              => new sfValidatorPass(array('required' => false)),
      'informacionadicional' => new sfValidatorPass(array('required' => false)),
      'created_at'           => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
      'updated_at'           => new sfValidatorDateRange(array('required' => false, 'from_date' => new sfValidatorDate(array('required' => false)), 'to_date' => new sfValidatorDate(array('required' => false)))),
    ));

    $this->widgetSchema->setNameFormat('empleados_filters[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'empleados';
  }

  public function getFields()
  {
    return array(
      'sf_guard_user'        => 'ForeignKey',
      'nombre'               => 'Text',
      'apellido'             => 'Text',
      'documento'            => 'Text',
      'direccion'            => 'Text',
      'ciudad'               => 'Text',
      'telefonoparticular'   => 'Text',
      'telefonocasa'         => 'Text',
      'correo1'              => 'Text',
      'correo2'              => 'Text',
      'informacionadicional' => 'Text',
      'created_at'           => 'Date',
      'updated_at'           => 'Date',
      'id'                   => 'Number',
    );
  }
}
